import QtQuick 2.15
import QtWebSockets 1.15
import QtQuick.Controls 2.15
import "Http.js" as Http
import Http 1.0
import Serivce 1.0
Rectangle{

    anchors.fill: parent

    color:"red"

    Servce{
        id:servce
    }


    HttpUtils{

        id:http
    }


    function getFreindVar(){

        function onReply(reply){

            console.log(reply)
            console.log("请求结束")

            http.onReplySignal.disconnect(onReply)
        }
        http.onReplySignal.connect(onReply)
        http.postApi("/lris/post",{username:"admin",password:123456})
    }




    Button{
        width: 50
        height:100
        onClicked: {
            getFreindVar()
        }

    }






}
